public class AdapterMusic implements IMediaPlayer{

    //默认格式为mp3
    private Aac aac;
    private M4a m4a;
    private Alac alac;

    public AdapterMusic(Aac aac, M4a m4a, Alac alac){
        this.aac = aac;
        this.m4a = m4a;
        this.alac = alac;
    }

    @Override
    public String playAac() {
        return aac.convertToMp3();
    }

    @Override
    public String playM4a() {
        return m4a.convertToMp3();
    }

    @Override
    public String playAlac() {
        return alac.convertToMp3();
    }
}